package com.rp.system.dao;

import org.raptor.orm.hibernate.DbaHibernateTemplateSupport;
import org.raptor.pagination.Page2;
import org.springframework.stereotype.Repository;

import com.rp.common.vo.PageParam;
import com.rp.system.po.LoginLog;

@Repository
public class LoginLogDao extends DbaHibernateTemplateSupport<LoginLog> {

	/**
	 * 分页获取登录日志数据
	 * @param pageParam
	 * @return
	 */
	public Page2 getLoginLogByPage(PageParam pageParam){
		String hql = "from LoginLog";
		return getPage2ByOffset(hql, 
				pageParam.getPageOffset(), pageParam.getPageSize(), 
				pageParam.getSortField(), pageParam.getSortOrder());
	}
	
}
